vcProductCreatorTableMode
Configuration for table feed mode in product creator. Holds a list of rows, each defining which product type to instantiate and at what simulation time. The rows are automatically sorted in ascending order by the product creation time. The rows can be loaded from a file or defined using methods of this class. Modifying the rows during simulation is allowed but may result in e.g. inaccurate timing of when the products are created.
See in: Overview
Module: vcProcessModel
Parent: vcObject
Children -
Referenced by: -
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| File | String | R | Gets a string of the Uri pointing to an xls file. |
| ProductRows | list | R | List of all currently defined product rows. The rows are returned as copies. |
| Properties | vcPropertyContainer | R | Gets a property container containing the properties in the product creator table mode. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| clearRows | None | None | Deletes all product rows. |
| createRow | vcProductCreatorTableRow | vcProductType productType, Optional Keyword[creationTime = Real] | Creates a new product row.See moreParameters: productType (vcProductType): Sets the row's product type. Must be set to make it valid. creationTime (Real or Integer): Sets the row's creation time. Value must be greater than or equal to zero. Exceptions: ValueError: When creation time is less than zero. Returns: Integer: The new row. |
| deleteRow | None | Integer index | Deletes the product row at given index.See moreParameters: index (Integer): The index must be in inclusive range 0 to RowCount - 1. Exceptions: IndexError: When index is less than zero or more than RowCount. |
| readRowsFromFile | list | String fileUri, Optional Keyword[showErrorMessages = Boolean] | Attempts to load rows from an xls file and returns them as a list if successful.See moreDoes not modify this table mode configuration. Parameters: fileUri(String): Uri to an xls file to read rows from. showErrorMessages(Boolean): Determine if errors are printed to the output. Returns: List of vcProductCreatorTableRow: The content of the file. Returns an empty list if reading or parsing the file failed. |
| replaceAllRows | None | list newRows | Deletes all rows and then adds the new rows as copies. See moreThe rows are sorted by the creation time using a stable sort algorithm. Parameters: newRows(List of vcProductCreatorTableRow): The new rows to replace the existing ones with. Exceptions: ValueError: When an object in list is not vcProductCreatorTableRow. ValueError: When Product type to create is not set. ValueError: When Product creation time is less than zero or not finite. |